<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
	protected function _initAutoload()
	{
		$moduleLoader = new Zend_Application_Module_Autoloader(array(
			'namespace' => '',
			'basePath' => APPLICATION_PATH));
		$this->getApplication()->getAutoloader()->registerNamespace('CodeBar_');
		return $moduleLoader;
	}

	protected function _initViewHelpers()
	{
		$this->bootstrap('layout');
		$layout = $this->getResource('layout');
		$view = $layout->getView();
		$view->doctype('XHTML1_STRICT');
		$view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
	}

	/**
	 * Initialize session
	 *
	 * @return Zend_Session_Namespace
	 */
	protected function _initSession() {
		$session = new Zend_Session_Namespace("codebar");
		return $session;
	}
}

